package simpleservlet;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.HttpRequest;


public class NettyRequest {
    private ChannelHandlerContext ctx; //SocketChannel的封装
    private HttpRequest httpRequest;

    public NettyRequest(ChannelHandlerContext ctx,HttpRequest request) {
        this.ctx = ctx;
        this.httpRequest = request;
    }

    public String getUrl() {
        return httpRequest.getUri();
    }

    public String getMethod() {
        return httpRequest.method().name();
    }

}
